const querystring=require("querystring");
function parseform(req,res,next){
    let data="";
    req.on("data",(chunk)=>{
        data+=chunk;
    })

    req.on("end",()=>{
        let obj=querystring.parse(data);
        req.body=obj;
        next();
    })
}
module.exports=parseform;